Simulating Biological Systems in the Stochastic Pi-calculus

نویسندگان

  • Andrew Phillips
  • Luca Cardelli
چکیده

Machine ➢ Formalise how the simulator works (program speci cation). ➢ Prove properties about the simulator. ➢ Give greater con dence in the simulation results. ➢ Improve on existing simulators. Andrew Phillips Microsoft Research 2004 23 Machine Data Structures ➢ Machine syntax νn1 νn2 ...νnN (Σ1 ::Σ2 :: ... ::ΣM :: []) : V,U ::= νn V Restriction p A List A,B ::= [] Empty p Σ::A Summation Andrew Phillips Microsoft Research 2004 24 Machine Encoding ➢ Encoding (P ): (P ) , P ◦ [] ➢ Construction (P ◦ V ): n 6∈ fn(P ) ⇒ P ◦ (νn V ) , νn (P ◦ V ) 0 ◦A , A (P | Q) ◦A , P ◦Q ◦A n 6∈ fn(P ◦A) ⇒ (νm P ) ◦A , νn (P{n/m} ◦A) !π.P ◦A , (π.(P | !π.P ) + 0) ◦A (π.P + Σ) ◦A , (π.P + Σ)::A Andrew Phillips Microsoft Research 2004 25 Machine Execution ➢ Reduction (V −→ V ′): V −→ V ′ ⇒ νn V −→ νn V ′ ∣∣∣∣ A Â (x(m).P + Σ)::A′ ∧A′ Â (x〈n〉.Q + Σ′) ::A′′ ⇒ A −→ P{n/m} ◦Q ◦A ′′ ➢ Selection: A Â A A Â Σ′ ::A′ ⇒ Σ::A Â Σ′ ::Σ::A′ Σ::A Â (π′.P ′ + Σ′) ::A ⇒ (π.P + Σ) :: A Â (π′.P ′ + π.P + Σ′) ::A Andrew Phillips Microsoft Research 2004 26 Stochastic Machine ➢ Machine can be easily extended with rates: V r −→ V ′ ⇒ νnr V r −→ νnr V ′ ∣∣∣∣∣ x = Next(A) ∧A Â (x(m).P + Σ)::A′ ∧A′ Â (xr〈n〉.Q + Σ′) ::A′′ ⇒ A r −→ P{n/m} ◦Q ◦A′′ ➢ Choose next reaction Next(A) using a stochastic algorithm (Gillespie) Andrew Phillips Microsoft Research 2004 27 Channel Activity ➢ Activity = number of possible interactions on a given channel: Actx(A) = (Inx(A) ∗Outx(A))−Mixx(A) ➢ Inx(A) = the number of unguarded inputs on channel x in A. ➢ Outx(A) = the number of unguarded outputs on channel x in A. ➢ Mixx(A) = the sum of Inx(Σi)×Outx(Σi) for each summation Σi in A. Andrew Phillips Microsoft Research 2004 28 Gillespie: Choosing the Next Reaction Next(A) 1. For all x ∈ fn(A) calculate axr = Actxr(A) ∗ r 2. Store non-zero values of axr in a list (xμ, aμ), where μ ∈ 1...M . 3. Calculate a0 = ∑M ν=0 aν 4. Randomly generate n1 and n2 ∈ [0, 1] and calculate τ and μ such that: τ = (1/a0) ln(1/n1) μ−1 ∑ ν=1 aν < n2a0 ≤ μ ∑ ν=1 aν 5. Next(A) = xμ and Delay(A) = τ . Andrew Phillips Microsoft Research 2004 29 Correctness of the Machine ➢ Safety: no runtime errors (no crashes) Lemma 1. ∀V.V ∈ PiM ∧ V −→ V ′ ⇒ V ′ ∈ PiM ➢ Soundness: machine only performs valid executions steps (behaves well) Theorem 1. ∀V.V ∈ PiM ∧ V −→ V ′ ⇒ [V ] −→ [V ′] ➢ Completeness: machine accurately executes all behaviours of the calculus Theorem 2. ∀P.P ∈ Pi ∧ P −→ P ′ ⇒ (P ) −→≡ (P ′). ➢ Termination: machine does not loop forever unnecessarily Theorem 3. ∀P.P ∈ Pi ∧ P 6−→⇒ (P ) 6−→ Andrew Phillips Microsoft Research 2004 30 Stochastic Correctness ➢ Theorems easily extend to reductions with rates ( r −→) ➢ Need to take into account the number of possible interactions on a channel: P1 , xr〈n〉.P + xr〈n〉.P | x(m).Q P2 , xr〈n〉.P | x(m).Q ➢ Reduction in P1 is twice as fast as the reduction in P2 ➢ Ensure that the reactions in the machine have the same rates as in the calculus Proposition 1. ∀V ∈ PiM.Appxr(V ) = Appxr([V ]) Proposition 2. ∀P ∈ Pi.Appxr(P ) = Appxr((P )) Andrew Phillips Microsoft Research 2004 31 Implementation ➢ Abstract Machine maps almost directly to program code ➢ Implemented a polymorphic type system and type checker ➢ Correctness of the machine gives greater con dence in the simulation results Andrew Phillips Microsoft Research 2004 32 Conclusion ➢ Presented a graphical representation for pi-calculus: ❑ Precise, compositional, executable descriptions. ❑ Used to model regulatory systems at the molecular level. ➢ Presented an abstract machine for the stochastic pi-calculus: ❑ Proof of correctness (safety, soundness, completeness, termination). ❑ Maps readily to program code. ➢ Built a simulator based on the machine. Andrew Phillips Microsoft Research 2004 33 Safety Proof Lemma 2. ∀V.V ∈ PiM ∧ V −→ V ′ ⇒ V ′ ∈ PiM Proof. By Lemma 3, Lemma 4 and by induction on reduction in PiM. 2 Lemma 3. ∀A ∈ PiM.A Â B ⇒ B ∈ PiM Proof. By induction on selection in PiM. 2 Lemma 4. ∀V.∀P.V ∈ PiM ∧ P ∈ Pi ⇒ P ◦ V ∈ PiM Proof. By induction on construction in PiM. 2 Andrew Phillips Microsoft Research 2004 34 Soundness Proof Lemma 5. ∀V.V ∈ PiM ⇒ [V ] ∈ Pi Proof. By induction on decoding in PiM. 2 Theorem 4. ∀V.V ∈ PiM ∧ V −→ V ′ ⇒ [V ] −→ [V ′] Proof. By Lemma 6, Lemma 7 and by induction on reduction in PiM. 2 Lemma 6. ∀A.A ∈ PiM ∧A Â B ⇒ [A] ≡ [B] Proof. By induction on selection in PiM. 2 Lemma 7. ∀V.∀P.V ∈ PiM ∧ P ∈ Pi ⇒ [P ◦ V ] ≡ P | [V ] Proof. By induction on construction in PiM. 2 [νn V ] , νn [V ] (1) [[]] , 0 (2) [Σ::A] , Σ | [A] (3) Andrew Phillips Microsoft Research 2004 35 Completeness Proof Lemma 8. ∀V.V ∈ PiM∧U ≡ V ∧V −→ V ′ ⇒ ∃U ′.U −→ U ′∧U ′ ≡ V ′ Proof. By induction on structural congruence in PiM. 2 Theorem 5. ∀P.P ∈ Pi ∧ P −→ P ′ ⇒ (P ) −→≡ (P ′). Proof. By Lemma 9 and by induction on reduction in Pi, where the rule for parallel composition is expanded over the remaining rules. 2 Lemma 9. P ≡ Q ⇒ (P ) ≡ (Q) Proof. By induction on structural congruence in Pi. 2 V ≡α U ⇒ V ≡ U n 6∈ fn(V ) ⇒ νn V ≡ V νx νy V ≡ νy νx V Andrew Phillips Microsoft Research 2004 36 Σ::Σ′ ::A ≡ Σ′ ::Σ::A A ≡ A′ ⇒ Σ::A ≡ Σ::A′ (π.P + π′.P ′ + Σ)::A ≡ (π′.P ′ + π.P + Σ)::A Σ::A ≡ Σ′ ::A ⇒ (π.P + Σ)::A ≡ (π.P + Σ′) ::A Andrew Phillips Microsoft Research 2004 37 Termination Proof Theorem 6. ∀P.P ∈ Pi ∧ P 6−→⇒ (P ) 6−→ Proof. By Theorem 4 and by basic relationships between encoding and decoding. 2 Andrew Phillips Microsoft Research 2004 38 Link Encoding ➢ Encoding uses restriction, replication, parallel composition and communication. ➢ A linked node → a replicated input on a fresh channel x, in parallel with an output on x ➢ A link to the node → an output on x. ➢ E.g.: Σ Σ π π ’ ’ = Σ Σ π π ’ ’ new x ! x() x<> x<> Andrew Phillips Microsoft Research 2004 39 Graphical Semantics x P x(m) P’ ’ x P x(m) P’ ’ x P x(m) P’ x P x(m) P’ Σ Σ ! Σ ! ! Σ ! ➢ Requires some imagination: for substituting names and for cloning graphs. Andrew Phillips Microsoft Research 2004 40

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

The Effects of Different SDE Calculus on Dynamics of Nano-Aerosols Motion in Two Phase Flow Systems

Langevin equation for a nano-particle suspended in a laminar fluid flow was analytically studied. The Brownian motion generated from molecular bombardment was taken as a Wiener stochastic process and approximated by a Gaussian white noise. Euler-Maruyama method was used to solve the Langevin equation numerically. The accuracy of Brownian simulation was checked by performing a series of simulati...

متن کامل

Simulating Bacterial Transcription and Translation in a Stochastic pi Calculus

Stochastic simulation of genetic networks based on models in the stochastic π-calculus is a promising recent approach. This paper contributes an extensible model of the central mechanisms of gene expression i.e. transcription and translation, at the prototypical instance of bacteria. We reach extensibility through object-oriented abstractions, that are expressible in a stochastic π-calculus wit...

متن کامل

Gene Regulation in the Pi Calculus: Simulating Cooperativity at the Lambda Switch

We propose to model the dynamics of gene regulatory networks as concurrent processes in the stochastic pi calculus. As a first case study, we show how to express the control of transcription initiation at the lambda switch, a prototypical example where cooperative enhancement is crucial. This requires concurrent programming techniques that are new to systems biology, and necessitates stochastic...

متن کامل

EPTCS Proceedings of the Fourth Workshop on Membrane Computing and Biologically Inspired Process Calculi 2010

Biological systems typically involve large numbers of components with complex, highly parallel interactions and intrinsic stochasticity. Numerous programming languages have been developed for modelling such systems, many of which are based on process calculi. Most of these calculi, particularly those involving membrane interactions, are expressive enough to generate potentially unbounded number...

متن کامل

A Visual Process Calculus for Biology

This chapter presents a visual process calculus for designing and simulating computer models of biological systems. The calculus is based on a graphical variant of stochastic pi-calculus, extended with mobile compartments, and the simulation algorithm is based on standard kinetic theory of physical chemistry. The calculus forms the basis of a formal visual programming language for biology. The ...

متن کامل

A Graphical Representation for the Stochastic Pi-Calculus

This paper presents a graphical representation for the stochastic pi-calculus, which builds on previous formal and informal notations. The graphical representation is used to model a Mapk signalling cascade and an evolved gene network. One of the main benefits of the representation is its ability to clearly highlight the existence of cycles, which are a key aspect of many biological systems. An...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2004